<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="spring" uri="http://www.springframework.org/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%><head>
	<title><fmt:message key="document" /></title>
</head>
<body>
	<c:url value="/domain/document/create" var="createUrl"/>
	<form:form action="${createUrl}" modelAttribute="document" enctype="multipart/form-data" method="POST">
		<form:errors cssClass="error"/>
		<table class="edit">
			<form:hidden path="documentId"/>
			<form:hidden path="version"/>
			<tbody>
				<tr>
					<th><fmt:message key="document_accountId" /> <em>*</em></th>
					<td>
						<form:select path="account" cssClass="required {maxlength: 32 minlength: 32}">
							<form:options items="${accounts}" itemValue="primaryKey"/>
						</form:select>
						<form:errors path="account" cssClass="error"/>
					</td>
				</tr>
				<tr class="odd">
					<th><fmt:message key="document_documentBinary" /></th>
					<td>
						${document.documentFileName}
						<br/>
						<input type="file" name="documentBinaryWeb"/>
						<form:errors path="documentBinary" cssClass="error"/>
					</td>
				</tr>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="2">
						<tags:button type="submit" key="crud.save.button" icon="ok"/>
					</td>
				</tr>
			</tfoot>
		</table>
	</form:form>
</body>
